function Exist(dataName : Str255) : boolean;

If the data window "dataName" exists then TRUE is returned, otherwise FALSE.

Also see:  FrontData